﻿Imports Microsoft.VisualBasic

Public Class DBPurchaseRequestDtlSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public ID As New TableField("ID", Data.SqlDbType.Int)
    Public PurReqID As New TableField("PurReqID", Data.SqlDbType.Int)
    Public ProgramNo As New TableField("ProgramNo", Data.SqlDbType.NVarChar)
    Public ProjectNo As New TableField("ProjectNo", Data.SqlDbType.NVarChar)
    Public ItemNo As New TableField("ItemNo", Data.SqlDbType.NVarChar)
    Public UnitNo As New TableField("UnitNo", Data.SqlDbType.NVarChar)
    Public UnitPrice As New TableField("UnitPrice", Data.SqlDbType.Float)
    Public Qty As New TableField("Qty", Data.SqlDbType.Float)
    Public PurchaseReason As New TableField("PurchaseReason", Data.SqlDbType.NVarChar)
    Public Remarks As New TableField("Remarks", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "PurchaseRequestDtlSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal ID As String = "", _
                                 Optional ByVal PurReqID As String = "", _
                                 Optional ByVal ProgramNo As String = "", _
                                 Optional ByVal ProjectNo As String = "", _
                                 Optional ByVal ItemNo As String = "", _
                                 Optional ByVal UnitNo As String = "", _
                                 Optional ByVal UnitPrice As String = "", _
                                 Optional ByVal Qty As String = "", _
                                 Optional ByVal PurchaseReason As String = "", _
                                 Optional ByVal Remarks As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.ID.SetValue(ID, MyBase.FieldsArrayList)
        Me.PurReqID.SetValue(PurReqID, MyBase.FieldsArrayList)
        Me.ProgramNo.SetValue(ProgramNo, MyBase.FieldsArrayList)
        Me.ProjectNo.SetValue(ProjectNo, MyBase.FieldsArrayList)
        Me.ItemNo.SetValue(ItemNo, MyBase.FieldsArrayList)
        Me.UnitNo.SetValue(UnitNo, MyBase.FieldsArrayList)
        Me.UnitPrice.SetValue(UnitPrice, MyBase.FieldsArrayList)
        Me.Qty.SetValue(Qty, MyBase.FieldsArrayList)
        Me.PurchaseReason.SetValue(PurchaseReason, MyBase.FieldsArrayList)
        Me.Remarks.SetValue(Remarks, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
